home *** CD-ROM | disk | FTP | other *** search
/ Internet Standards / CD1.mdf / winsock / hacker / 93-11 / 000005_rcq@ftp.com_Tue Nov 30 07:12:32 1993.msg < prev   
Internet Message Format  |  1993-11-29  |  2KB

  1. Received: from ftp.com (babyoil.ftp.com) by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.06) with SMTP
  2.           id AA12840; Tue, 30 Nov 1993 12:12:56 -0500
  3. Received: from rcq.oysters.ftp.com by ftp.com via PCMAIL with DMSP
  4.     id AA22885; Tue, 30 Nov 93 12:12:32 -0500
  5. Date: Tue, 30 Nov 93 12:12:32 -0500
  6. Message-Id: <9311301712.AA22885@ftp.com>
  7. To: paul@atlas.abccomp.oz.au
  8. Subject: Re: Multiple connect()s with SOCK_DGRAM sockets?
  9. From: rcq@ftp.com  (Bob Quinn)
  10. Reply-To: rcq@ftp.com
  11. Cc: Multiple recipients of list <winsock-hackers@sunsite.unc.edu>
  12. Sender: rcq@ftp.com
  13. Repository: babyoil.ftp.com
  14. Originating-Client: oysters.ftp.com
  15.  
  16. Hi Paul!
  17.  
  18. >  What is the feeling of the community in allowing multiple connect() calls
  19. >  on SOCK_DGRAM sockets? I have several conflicting points either way:
  20. ...
  21. >  Since I've been informed more than once that the aim is "BSD compatibility",
  22. >  and if the Winsock spec differs from BSD behaviour, the BSD behaviour is what
  23. >  should be followed, I would like to propose some standard behaviour for
  24.  
  25. Agreed.
  26.  
  27. >  1)      A connected SOCK_DGRAM socket can be "dis-connected" by calling
  28. >          connect() again with a destination 'name' consisting of address and
  29. >          port containing all zeros, and a valid family for the socket
  30. >          (i.e. "AF_INET / 0 / 0.0.0.0").
  31.  
  32. The address 0.0.0.0 is the value for INADDR_ANY which should cause
  33. connect() to fail with WSAEDESTADDRREQ.  What about using INADDR_NONE
  34. instead?
  35.  
  36. >  2)      A connected SOCK_DGRAM must be dis-connected using this method before
  37. >          it can be re-connected again, to the same or different destination
  38. >          address, otherwise an error code of WSAEISCONN will be returned
  39. >          (just like should happen now).
  40.  
  41. Why should you have to disconnect, it's not like there's a real
  42. connection to close?  All a UDP connect() does is change the foreign
  43. IP Address and/or foreign port in the "association" (the 5-tuple of
  44. Protocol, Local IP Addr, Local Port, Foreign IP Addr and Foreign Port).
  45. I can't think of any reason why it should fail, as long as they
  46. provide a valid foreign address (i.e. an address other than 0.0.0.0).
  47.  
  48. Regards,
  49. --
  50.  Bob Quinn                                             rcq@ftp.com
  51.  FTP Software, Inc.                                No. Andover, MA